<?php

class L10nInfo
{
    private function __construct() {}

    protected static function &getInstance()
    {
        static $instance = null;
        if (is_null($instance)) {
            $instance = new self();
        }

        return $instance;
    }

    protected $countries = array(
        "AFGHANISTAN" => "AF",
        "ÅLAND ISLANDS" => "AX",
        "ALBANIA" => "AL",
        "ALGERIA" => "DZ",
        "AMERICAN SAMOA" => "AS",
        "ANDORRA" => "AD",
        "ANGOLA" => "AO",
        "ANGUILLA" => "AI",
        "ANTARCTICA" => "AQ",
        "ANTIGUA AND BARBUDA" => "AG",
        "ARGENTINA" => "AR",
        "ARMENIA" => "AM",
        "ARUBA" => "AW",
        "AUSTRALIA" => "AU",
        "AUSTRIA" => "AT",
        "AZERBAIJAN" => "AZ",
        "BAHAMAS" => "BS",
        "BAHRAIN" => "BH",
        "BANGLADESH" => "BD",
        "BARBADOS" => "BB",
        "BELARUS" => "BY",
        "BELGIUM" => "BE",
        "BELIZE" => "BZ",
        "BENIN" => "BJ",
        "BERMUDA" => "BM",
        "BHUTAN" => "BT",
        "BOLIVIA" => "BO",
        "BOSNIA AND HERZEGOVINA" => "BA",
        "BOTSWANA" => "BW",
        "BOUVET ISLAND" => "BV",
        "BRAZIL" => "BR",
        "BRITISH INDIAN OCEAN TERRITORY" => "IO",
        "BRUNEI DARUSSALAM" => "BN",
        "BULGARIA" => "BG",
        "BURKINA FASO" => "BF",
        "BURUNDI" => "BI",
        "CAMBODIA" => "KH",
        "CAMEROON" => "CM",
        "CANADA" => "CA",
        "CAPE VERDE" => "CV",
        "CAYMAN ISLANDS" => "KY",
        "CENTRAL AFRICAN REPUBLIC" => "CF",
        "CHAD" => "TD",
        "CHILE" => "CL",
        "CHINA" => "CN",
        "CHRISTMAS ISLAND" => "CX",
        "COCOS (KEELING) ISLANDS" => "CC",
        "COLOMBIA" => "CO",
        "COMOROS" => "KM",
        "CONGO" => "CG",
        "CONGO, THE DEMOCRATIC REPUBLIC OF THE" => "CD",
        "COOK ISLANDS" => "CK",
        "COSTA RICA" => "CR",
        "CÔTE D'IVOIRE" => "CI",
        "CROATIA" => "HR",
        "CUBA" => "CU",
        "CYPRUS" => "CY",
        "CZECH REPUBLIC" => "CZ",
        "DENMARK" => "DK",
        "DJIBOUTI" => "DJ",
        "DOMINICA" => "DM",
        "DOMINICAN REPUBLIC" => "DO",
        "ECUADOR" => "EC",
        "EGYPT" => "EG",
        "EL SALVADOR" => "SV",
        "EQUATORIAL GUINEA" => "GQ",
        "ERITREA" => "ER",
        "ESTONIA" => "EE",
        "ETHIOPIA" => "ET",
        "FALKLAND ISLANDS (MALVINAS)" => "FK",
        "FAROE ISLANDS" => "FO",
        "FIJI" => "FJ",
        "FINLAND" => "FI",
        "FRANCE" => "FR",
        "FRENCH GUIANA" => "GF",
        "FRENCH POLYNESIA" => "PF",
        "FRENCH SOUTHERN TERRITORIES" => "TF",
        "GABON" => "GA",
        "GAMBIA" => "GM",
        "GEORGIA" => "GE",
        "GERMANY" => "DE",
        "GHANA" => "GH",
        "GIBRALTAR" => "GI",
        "GREECE" => "GR",
        "GREENLAND" => "GL",
        "GRENADA" => "GD",
        "GUADELOUPE" => "GP",
        "GUAM" => "GU",
        "GUATEMALA" => "GT",
        "GUERNSEY" => "GG",
        "GUINEA" => "GN",
        "GUINEA-BISSAU" => "GW",
        "GUYANA" => "GY",
        "HAITI" => "HT",
        "HEARD ISLAND AND MCDONALD ISLANDS" => "HM",
        "HOLY SEE (VATICAN CITY STATE)" => "VA",
        "HONDURAS" => "HN",
        "HONG KONG" => "HK",
        "HUNGARY" => "HU",
        "ICELAND" => "IS",
        "INDIA" => "IN",
        "INDONESIA" => "ID",
        "IRAN, ISLAMIC REPUBLIC OF" => "IR",
        "IRAQ" => "IQ",
        "IRELAND" => "IE",
        "ISLE OF MAN" => "IM",
        "ISRAEL" => "IL",
        "ITALY" => "IT",
        "JAMAICA" => "JM",
        "JAPAN" => "JP",
        "JERSEY" => "JE",
        "JORDAN" => "JO",
        "KAZAKHSTAN" => "KZ",
        "KENYA" => "KE",
        "KIRIBATI" => "KI",
        "KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF" => "KP",
        "KOREA, REPUBLIC OF" => "KR",
        "KUWAIT" => "KW",
        "KYRGYZSTAN" => "KG",
        "LAO PEOPLE'S DEMOCRATIC REPUBLIC" => "LA",
        "LATVIA" => "LV",
        "LEBANON" => "LB",
        "LESOTHO" => "LS",
        "LIBERIA" => "LR",
        "LIBYAN ARAB JAMAHIRIYA" => "LY",
        "LIECHTENSTEIN" => "LI",
        "LITHUANIA" => "LT",
        "LUXEMBOURG" => "LU",
        "MACAO" => "MO",
        "MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF" => "MK",
        "MADAGASCAR" => "MG",
        "MALAWI" => "MW",
        "MALAYSIA" => "MY",
        "MALDIVES" => "MV",
        "MALI" => "ML",
        "MALTA" => "MT",
        "MARSHALL ISLANDS" => "MH",
        "MARTINIQUE" => "MQ",
        "MAURITANIA" => "MR",
        "MAURITIUS" => "MU",
        "MAYOTTE" => "YT",
        "MEXICO" => "MX",
        "MICRONESIA, FEDERATED STATES OF" => "FM",
        "MOLDOVA, REPUBLIC OF" => "MD",
        "MONACO" => "MC",
        "MONGOLIA" => "MN",
        "MONTENEGRO" => "ME",
        "MONTSERRAT" => "MS",
        "MOROCCO" => "MA",
        "MOZAMBIQUE" => "MZ",
        "MYANMAR" => "MM",
        "NAMIBIA" => "NA",
        "NAURU" => "NR",
        "NEPAL" => "NP",
        "NETHERLANDS" => "NL",
        "NETHERLANDS ANTILLES" => "AN",
        "NEW CALEDONIA" => "NC",
        "NEW ZEALAND" => "NZ",
        "NICARAGUA" => "NI",
        "NIGER" => "NE",
        "NIGERIA" => "NG",
        "NIUE" => "NU",
        "NORFOLK ISLAND" => "NF",
        "NORTHERN MARIANA ISLANDS" => "MP",
        "NORWAY" => "NO",
        "OMAN" => "OM",
        "PAKISTAN" => "PK",
        "PALAU" => "PW",
        "PALESTINIAN TERRITORY, OCCUPIED" => "PS",
        "PANAMA" => "PA",
        "PAPUA NEW GUINEA" => "PG",
        "PARAGUAY" => "PY",
        "PERU" => "PE",
        "PHILIPPINES" => "PH",
        "PITCAIRN" => "PN",
        "POLAND" => "PL",
        "PORTUGAL" => "PT",
        "PUERTO RICO" => "PR",
        "QATAR" => "QA",
        "REUNION" => "RE",
        "ROMANIA" => "RO",
        "RUSSIAN FEDERATION" => "RU",
        "RWANDA" => "RW",
        "SAINT BARTHÉLEMY" => "BL",
        "SAINT HELENA" => "SH",
        "SAINT KITTS AND NEVIS" => "KN",
        "SAINT LUCIA" => "LC",
        "SAINT MARTIN" => "MF",
        "SAINT PIERRE AND MIQUELON" => "PM",
        "SAINT VINCENT AND THE GRENADINES" => "VC",
        "SAMOA" => "WS",
        "SAN MARINO" => "SM",
        "SAO TOME AND PRINCIPE" => "ST",
        "SAUDI ARABIA" => "SA",
        "SENEGAL" => "SN",
        "SERBIA" => "RS",
        "SEYCHELLES" => "SC",
        "SIERRA LEONE" => "SL",
        "SINGAPORE" => "SG",
        "SLOVAKIA" => "SK",
        "SLOVENIA" => "SI",
        "SOLOMON ISLANDS" => "SB",
        "SOMALIA" => "SO",
        "SOUTH AFRICA" => "ZA",
        "SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS" => "GS",
        "SPAIN" => "ES",
        "SRI LANKA" => "LK",
        "SUDAN" => "SD",
        "SURINAME" => "SR",
        "SVALBARD AND JAN MAYEN" => "SJ",
        "SWAZILAND" => "SZ",
        "SWEDEN" => "SE",
        "SWITZERLAND" => "CH",
        "SYRIAN ARAB REPUBLIC" => "SY",
        "TAIWAN, PROVINCE OF CHINA" => "TW",
        "TAJIKISTAN" => "TJ",
        "TANZANIA, UNITED REPUBLIC OF" => "TZ",
        "THAILAND" => "TH",
        "TIMOR-LESTE" => "TL",
        "TOGO" => "TG",
        "TOKELAU" => "TK",
        "TONGA" => "TO",
        "TRINIDAD AND TOBAGO" => "TT",
        "TUNISIA" => "TN",
        "TURKEY" => "TR",
        "TURKMENISTAN" => "TM",
        "TURKS AND CAICOS ISLANDS" => "TC",
        "TUVALU" => "TV",
        "UGANDA" => "UG",
        "UKRAINE" => "UA",
        "UNITED ARAB EMIRATES" => "AE",
        "UNITED KINGDOM" => "GB",
        "UNITED STATES" => "US",
        "UNITED STATES MINOR OUTLYING ISLANDS" => "UM",
        "URUGUAY" => "UY",
        "UZBEKISTAN" => "UZ",
        "VANUATU" => "VU",
        "VENEZUELA" => "VE",
        "VIET NAM" => "VN",
        "VIRGIN ISLANDS, BRITISH" => "VG",
        "VIRGIN ISLANDS, U.S." => "VI",
        "WALLIS AND FUTUNA" => "WF",
        "WESTERN SAHARA" => "EH",
        "YEMEN" => "YE",
        "ZAMBIA" => "ZM",
        "ZIMBABWE" => "ZW",
    );

    protected $currencies_by_countries = array(
        "AD" => array("EUR"),
        "AE" => array("AED"),
        "AF" => array("AFN"),
        "AG" => array("XCD"),
        "AI" => array("XCD"),
        "AL" => array("ALL"),
        "AM" => array("AMD"),
        "AN" => array("ANG"),
        "AO" => array("AOA"),
        "AR" => array("ARS"),
        "AS" => array("USD"),
        "AT" => array("EUR"),
        "AU" => array("AUD"),
        "AW" => array("AWG"),
        "AZ" => array("AZN"),
        "BA" => array("BAM"),
        "BB" => array("BBD"),
        "BD" => array("BDT"),
        "BE" => array("EUR"),
        "BF" => array("XOF"),
        "BG" => array("BGN"),
        "BH" => array("BHD"),
        "BI" => array("BIF"),
        "BJ" => array("XOF"),
        "BM" => array("BMD"),
        "BN" => array("BND"),
        "BO" => array("BOB", "BOV"),
        "BR" => array("BRL"),
        "BS" => array("BSD"),
        "BT" => array("BTN", "INR"),
        "BV" => array("NOK"),
        "BW" => array("BWP"),
        "BY" => array("BYR"),
        "BZ" => array("BZD"),
        "CA" => array("CAD"),
        "CC" => array("AUD"),
        "CD" => array("CDF"),
        "CF" => array("XAF"),
        "CG" => array("XAF"),
        "CH" => array("CHE", "CHF", "CHW"),
        "CI" => array("XOF"),
        "CK" => array("NZD"),
        "CL" => array("CLF", "CLP"),
        "CM" => array("XAF"),
        "CN" => array("CNY"),
        "CO" => array("COU"),
        "CR" => array("CRC"),
        "CU" => array("CUP"),
        "CV" => array("CVE"),
        "CX" => array("AUD"),
        "CY" => array("EUR"),
        "CZ" => array("CZK"),
        "DE" => array("EUR"),
        "DJ" => array("DJF"),
        "DK" => array("DKK"),
        "DM" => array("XCD"),
        "DO" => array("DOP"),
        "DZ" => array("DZD"),
        "EC" => array("USD"),
        "EE" => array("EEK"),
        "EG" => array("EGP"),
        "EH" => array("MAD"),
        "ER" => array("ERN"),
        "ES" => array("EUR"),
        "ET" => array("ETB"),
        "FI" => array("EUR"),
        "FJ" => array("FJD"),
        "FK" => array("FKP"),
        "FM" => array("USD"),
        "FO" => array("DKK"),
        "FR" => array("EUR"),
        "GA" => array("XAF"),
        "GB" => array("GBP"),
        "GD" => array("XCD"),
        "GE" => array("GEL"),
        "GF" => array("EUR"),
        "GH" => array("GHS"),
        "GI" => array("GIP"),
        "GL" => array("DKK"),
        "GM" => array("GMD"),
        "GN" => array("GNF"),
        "GP" => array("EUR"),
        "GQ" => array("XAF"),
        "GR" => array("EUR"),
        "GT" => array("GTQ"),
        "GU" => array("USD"),
        "GW" => array("GWP", "XOF"),
        "GY" => array("GYD"),
        "HK" => array("HKD"),
        "HM" => array("AUD"),
        "HN" => array("HNL"),
        "HR" => array("HRK"),
        "HT" => array("HTG", "USD"),
        "HU" => array("HUF"),
        "ID" => array("IDR"),
        "IE" => array("EUR"),
        "IL" => array("ILS"),
        "IN" => array("INR"),
        "IO" => array("USD"),
        "IQ" => array("IQD"),
        "IR" => array("IRR"),
        "IS" => array("ISK"),
        "IT" => array("EUR"),
        "JM" => array("JMD"),
        "JO" => array("JOD"),
        "JP" => array("JPY"),
        "KE" => array("KES"),
        "KG" => array("KGS"),
        "KH" => array("KHR"),
        "KI" => array("AUD"),
        "KM" => array("KMF"),
        "KN" => array("XCD"),
        "KP" => array("KPW"),
        "KR" => array("KRW"),
        "KW" => array("KWD"),
        "KY" => array("KYD"),
        "KZ" => array("KZT"),
        "LA" => array("LAK"),
        "LB" => array("LBP"),
        "LC" => array("XCD"),
        "LI" => array("CHF"),
        "LK" => array("LKR"),
        "LR" => array("LRD"),
        "LS" => array("LSL", "ZAR"),
        "LT" => array("LTL"),
        "LU" => array("EUR"),
        "LV" => array("LVL"),
        "LY" => array("LYD"),
        "MA" => array("MAD"),
        "MC" => array("EUR"),
        "MD" => array("MDL"),
        "ME" => array("EUR"),
        "MG" => array("MGA"),
        "MH" => array("USD"),
        "MK" => array("MKD"),
        "ML" => array("XOF"),
        "MM" => array("MMK"),
        "MN" => array("MNT"),
        "MO" => array("MOP"),
        "MP" => array("USD"),
        "MQ" => array("EUR"),
        "MR" => array("MRO"),
        "MS" => array("XCD"),
        "MT" => array("EUR"),
        "MU" => array("MUR"),
        "MV" => array("MVR"),
        "MW" => array("MWK"),
        "MX" => array("MXN", "MXV"),
        "MY" => array("MYR"),
        "MZ" => array("MZN"),
        "NA" => array("NAD", "ZAR"),
        "NC" => array("XPF"),
        "NE" => array("XOF"),
        "NF" => array("AUD"),
        "NG" => array("NGN"),
        "NI" => array("NIO"),
        "NL" => array("EUR"),
        "NO" => array("NOK"),
        "NP" => array("NPR"),
        "NR" => array("AUD"),
        "NU" => array("NZD"),
        "NZ" => array("NZD"),
        "OM" => array("OMR"),
        "PA" => array("PAB", "USD"),
        "PE" => array("PEN"),
        "PF" => array("XPF"),
        "PG" => array("PGK"),
        "PH" => array("PHP"),
        "PK" => array("PKR"),
        "PL" => array("PLN"),
        "PM" => array("EUR"),
        "PN" => array("NZD"),
        "PR" => array("USD"),
        "PT" => array("EUR"),
        "PW" => array("USD"),
        "PY" => array("PYG"),
        "QA" => array("QAR"),
        "RE" => array("EUR"),
        "RO" => array("RON"),
        "RS" => array("RSD"),
        "RU" => array("RUB"),
        "RW" => array("RWF"),
        "SA" => array("SAR"),
        "SB" => array("SBD"),
        "SC" => array("SCR"),
        "SD" => array("SDG"),
        "SE" => array("SEK"),
        "SG" => array("SGD"),
        "SH" => array("SHP"),
        "SI" => array("EUR"),
        "SJ" => array("NOK"),
        "SK" => array("EUR", "SKK"),
        "SL" => array("SLL"),
        "SM" => array("EUR"),
        "SN" => array("XOF"),
        "SO" => array("SOS"),
        "SR" => array("SRD"),
        "ST" => array("STD"),
        "SV" => array("SVC", "USD"),
        "SY" => array("SYP"),
        "SZ" => array("SZL"),
        "TC" => array("USD"),
        "TD" => array("XAF"),
        "TF" => array("EUR"),
        "TG" => array("XOF"),
        "TH" => array("THB"),
        "TJ" => array("TJS"),
        "TK" => array("NZD"),
        "TL" => array("USD"),
        "TM" => array("TMM"),
        "TN" => array("TND"),
        "TO" => array("TOP"),
        "TR" => array("TRY"),
        "TT" => array("TTD"),
        "TV" => array("AUD"),
        "TW" => array("TWD"),
        "TZ" => array("TZS"),
        "UA" => array("UAH"),
        "UG" => array("UGX"),
        "UM" => array("USD"),
        "US" => array("USD", "USN", "USS"),
        "UY" => array("UYI", "UYU"),
        "UZ" => array("UZS"),
        "VA" => array("EUR"),
        "VC" => array("XCD"),
        "VE" => array("VEF"),
        "VG" => array("USD"),
        "VI" => array("USD"),
        "VN" => array("VND"),
        "VU" => array("VUV"),
        "WF" => array("XPF"),
        "WS" => array("WST"),
        "YE" => array("YER"),
        "YT" => array("EUR"),
        "ZA" => array("ZAR"),
        "ZM" => array("ZMK"),
        "ZW" => array("ZWR"),
    );

    protected $adding_currencies = array (
        "XAG" => "Silver",
        "XAU" => "Gold",
        "XBA" => "Bond Markets Units European Composite Unit (EURCO)",
        "XBB" => "European Monetary Unit (E.M.U.-6)",
        "XBC" => "European Unit of Account 9(E.U.A.-9)",
        "XBD" => "European Unit of Account 17(E.U.A.-17)",
        "XDR" => "INTERNATIONAL MONETARY FUND (I.M.F)",
        "XFU" => "UIC-Franc",
        "XPD" => "Palladium",
        "XPT" => "Platinum",
        "XTS" => "Codes specifically reserved for testing purposes",
        "XXX" => "The codes assigned for transactions where no currency is involved are",
    );

    protected $countries_by_currency = array(
        "AED" => array("AE"),
        "AFN" => array("AF"),
        "ALL" => array("AL"),
        "AMD" => array("AM"),
        "ANG" => array("AN"),
        "AOA" => array("AO"),
        "ARS" => array("AR"),
        "AUD" => array("AU", "CC", "CX", "HM", "KI", "NF", "NR", "TV"),
        "AWG" => array("AW"),
        "AZN" => array("AZ"),
        "BAM" => array("BA"),
        "BBD" => array("BB"),
        "BDT" => array("BD"),
        "BGN" => array("BG"),
        "BHD" => array("BH"),
        "BIF" => array("BI"),
        "BMD" => array("BM"),
        "BND" => array("BN"),
        "BOB" => array("BO"),
        "BOV" => array("BO"),
        "BRL" => array("BR"),
        "BSD" => array("BS"),
        "BTN" => array("BT"),
        "BWP" => array("BW"),
        "BYR" => array("BY"),
        "BZD" => array("BZ"),
        "CAD" => array("CA"),
        "CDF" => array("CD"),
        "CHE" => array("CH"),
        "CHF" => array("CH", "LI"),
        "CHW" => array("CH"),
        "CLF" => array("CL"),
        "CLP" => array("CL"),
        "CNY" => array("CN"),
        "COU" => array("CO"),
        "CRC" => array("CR"),
        "CUP" => array("CU"),
        "CVE" => array("CV"),
        "CZK" => array("CZ"),
        "DJF" => array("DJ"),
        "DKK" => array("DK", "FO", "GL"),
        "DOP" => array("DO"),
        "DZD" => array("DZ"),
        "EEK" => array("EE"),
        "EGP" => array("EG"),
        "ERN" => array("ER"),
        "ETB" => array("ET"),
        "EUR" => array("AD", "AT", "BE", "CY", "DE", "ES", "FI", "FR", "GF", "GP", "GR", "IE", "IT", "LU", "MC", "ME", "MQ", "MT", "NL", "PM", "PT", "RE", "SI", "SK", "SM", "TF", "VA", "YT"),
        "FJD" => array("FJ"),
        "FKP" => array("FK"),
        "GBP" => array("GB"),
        "GEL" => array("GE"),
        "GHS" => array("GH"),
        "GIP" => array("GI"),
        "GMD" => array("GM"),
        "GNF" => array("GN"),
        "GTQ" => array("GT"),
        "GWP" => array("GW"),
        "GYD" => array("GY"),
        "HKD" => array("HK"),
        "HNL" => array("HN"),
        "HRK" => array("HR"),
        "HTG" => array("HT"),
        "HUF" => array("HU"),
        "IDR" => array("ID"),
        "ILS" => array("IL"),
        "INR" => array("BT", "IN"),
        "IQD" => array("IQ"),
        "IRR" => array("IR"),
        "ISK" => array("IS"),
        "JMD" => array("JM"),
        "JOD" => array("JO"),
        "JPY" => array("JP"),
        "KES" => array("KE"),
        "KGS" => array("KG"),
        "KHR" => array("KH"),
        "KMF" => array("KM"),
        "KPW" => array("KP"),
        "KRW" => array("KR"),
        "KWD" => array("KW"),
        "KYD" => array("KY"),
        "KZT" => array("KZ"),
        "LAK" => array("LA"),
        "LBP" => array("LB"),
        "LKR" => array("LK"),
        "LRD" => array("LR"),
        "LSL" => array("LS"),
        "LTL" => array("LT"),
        "LVL" => array("LV"),
        "LYD" => array("LY"),
        "MAD" => array("EH", "MA"),
        "MDL" => array("MD"),
        "MGA" => array("MG"),
        "MKD" => array("MK"),
        "MMK" => array("MM"),
        "MNT" => array("MN"),
        "MOP" => array("MO"),
        "MRO" => array("MR"),
        "MUR" => array("MU"),
        "MVR" => array("MV"),
        "MWK" => array("MW"),
        "MXN" => array("MX"),
        "MXV" => array("MX"),
        "MYR" => array("MY"),
        "MZN" => array("MZ"),
        "NAD" => array("NA"),
        "NGN" => array("NG"),
        "NIO" => array("NI"),
        "NOK" => array("BV", "NO", "SJ"),
        "NPR" => array("NP"),
        "NZD" => array("CK", "NU", "NZ", "PN", "TK"),
        "OMR" => array("OM"),
        "PAB" => array("PA"),
        "PEN" => array("PE"),
        "PGK" => array("PG"),
        "PHP" => array("PH"),
        "PKR" => array("PK"),
        "PLN" => array("PL"),
        "PYG" => array("PY"),
        "QAR" => array("QA"),
        "RON" => array("RO"),
        "RSD" => array("RS"),
        "RUB" => array("RU"),
        "RWF" => array("RW"),
        "SAR" => array("SA"),
        "SBD" => array("SB"),
        "SCR" => array("SC"),
        "SDG" => array("SD"),
        "SEK" => array("SE"),
        "SGD" => array("SG"),
        "SHP" => array("SH"),
        "SKK" => array("SK"),
        "SLL" => array("SL"),
        "SOS" => array("SO"),
        "SRD" => array("SR"),
        "STD" => array("ST"),
        "SVC" => array("SV"),
        "SYP" => array("SY"),
        "SZL" => array("SZ"),
        "THB" => array("TH"),
        "TJS" => array("TJ"),
        "TMM" => array("TM"),
        "TND" => array("TN"),
        "TOP" => array("TO"),
        "TRY" => array("TR"),
        "TTD" => array("TT"),
        "TWD" => array("TW"),
        "TZS" => array("TZ"),
        "UAH" => array("UA"),
        "UGX" => array("UG"),
        "USD" => array("AS", "EC", "FM", "GU", "HT", "IO", "MH", "MP", "PA", "PR", "PW", "SV", "TC", "TL", "UM", "US", "VG", "VI"),
        "USN" => array("US"),
        "USS" => array("US"),
        "UYI" => array("UY"),
        "UYU" => array("UY"),
        "UZS" => array("UZ"),
        "VEF" => array("VE"),
        "VND" => array("VN"),
        "VUV" => array("VU"),
        "WST" => array("WS"),
        "XAF" => array("CF", "CG", "CM", "GA", "GQ", "TD"),
        "XCD" => array("AG", "AI", "DM", "GD", "KN", "LC", "MS", "VC"),
        "XOF" => array("BF", "BJ", "CI", "GW", "ML", "NE", "SN", "TG"),
        "XPF" => array("NC", "PF", "WF"),
        "YER" => array("YE"),
        "ZAR" => array("LS", "NA", "ZA"),
        "ZMK" => array("ZM"),
        "ZWR" => array("ZW"),
    );

    /**
     * Возвращает масив двухзначных кодов (заглавными буквами) стран использующих указаную валюту.
     * Если не смогла найти или неверный код валюты то генерируется исключение.
     *
     * @param string $currency Трёхзначный код валюты (заглавными буквами)
     * @return array of string
     */
    protected function _countriesByCurrency($currency)
    {
        if (! is_string($currency)) {
            throw new Exception(__CLASS__."::countriesByCurrency: Bad argument for currency.");
        }
        if (empty($this->countries_by_currency[$currency])) {
            throw new Exception(__CLASS__."::countriesByCurrency: Bad argument for currency.");
        }
        return $this->countries_by_currency[$currency];
    }

    /**
     * Возвращает масив трёхзначных кодов (заглавными буквами) валют используемых в указанной стране.
     * Если не смогла найти или неверный код страны то генерируется исключение.
     *
     * @param string $country Двухзначный код страны (заглавными буквами)
     * @return array of string
     */
    protected function _currenciesByCountry($country)
    {
        if (! is_string($country)) {
            throw new Exception(__CLASS__."::currenciesByCountry: Bad argument for country.");
        }
        if (empty($this->currencies_by_countries[$country])) {
            throw new Exception(__CLASS__."::currenciesByCountry: Bad argument for country.");
        }
        return $this->currencies_by_countries[$country];
    }

    /////////////////////////////////////////////////////////////////////////////////////////////////////
    /// Интерфейс ///////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////
    /**
     * Возвращает масив двухзначных кодов (заглавными буквами) стран использующих указаную валюту.
     * Если не смогла найти или неверный код валюты то генерируется исключение.
     *
     * @param string $currency Трёхзначный код валюты (заглавными буквами)
     * @return array of string
     */
    public static function countriesByCurrency($currency)
    {
        return self::getInstance()->_countriesByCurrency($currency);
    }

    /**
     * Возвращает масив трёхзначных кодов (заглавными буквами) валют используемых в указанной стране.
     * Если не смогла найти или неверный код страны то генерируется исключение.
     *
     * @param string $country Двухзначный код страны (заглавными буквами)
     * @return array of string
     */
    public static function currenciesByCountry($country)
    {
        return self::getInstance()->_currenciesByCountry($country);
    }
}

?>